package com.ross.mode;

import java.util.Date;

/**
 * @version 1.0.0
 * @className: Email
 * @description:
 * @author: zhangjunfa
 * @date: 2023/4/3 12:02
 */
public class Email implements Cloneable {
    private Attachment attachment = null;
    private Date date;

    public Email() {
        this.attachment = new Attachment();
    }

    public Attachment getAttachment() {
        return attachment;
    }

    public void setAttachment(Attachment attachment) {
        this.attachment = attachment;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void display() {
        System.out.println("查看邮件！！");
    }

    @Override
    public Object clone() {
        Email email = null;
        try {
            email = (Email) super.clone();
            return email;
        } catch (CloneNotSupportedException e) {
            System.out.println("Clone failure!");
        }
        return null;
    }
}
